#!/usr/bin/perl -w

#=======================================================================
# $Id$
# Generates statistics from a Subversion repository.
#
# Character set: UTF-8
# ©opyleft 2004– Øyvind A. Holm <sunny@sunbase.org>
# License: GNU General Public License, see end of file for legal stuff.
#=======================================================================

use strict;
use Getopt::Long;

$| = 1;

our ($opt_help) =
    (        0);

my $VERSION = "0.0.0";

our $progname = $0;
$progname =~ s#^.*/(.*?)$#$1#;

my $rcs_id = '$Id$';
my $id_date = $rcs_id;
$id_date =~ s/^.*?\d+ (\d\d\d\d-.*?\d\d:\d\d:\d\d\S+).*/$1/;

Getopt::Long::Configure("bundling");
GetOptions(
    "help|h"       => \$opt_help
) || die("$progname: Option error. Use -h for help.\n");

$opt_help && usage(0);

while (<>) {
    print;
}

sub usage {
    # Send the help message to stdout {{{
    my $Retval = shift;
    print(<<END);

$progname v$VERSION -- $id_date

Usage: $progname [options] [file [files [...]]]

Options:

-h, --help  Show this help.

END
    exit($Retval);
    # }}}
}

__END__

# Plain Old Documentation (POD) {{{

=pod

=head1 NAME

svnstat

=head1 REVISION

$Id$

=head1 SYNOPSIS

svnstat [options] [[file|dir|URL] ...]]

=head1 DESCRIPTION

Generates various statistics from a Subversion repository.

=head1 OPTIONS

(Not implemented yet, only drafts.)

=over 4

=item B<--author> x

Use only data from author x. Can be repeated.

=item B<-h>, B<--help>

Print a brief help summary.

=item B<--commits-per> timespec

Generate a curve with the number of commits per I<timespec>.
Valid strftime(3)-like modifiers:

=over 4

=item B<y>

year

=item B<m>

month

=item B<w>

week

=item B<d>

day

=item B<H>

hour

=item B<M>

minute

=item B<S>

second

|1d|1h|2h|4w|1m|2y

=back


=back

=head1 BUGS

No code, no bugs.

=head1 AUTHOR

Made by Øyvind A. Holm S<E<lt>sunny _AT_ sunbase.orgE<gt>>.

=head1 COPYRIGHT

Copyleft © Øyvind A. Holm &lt;sunny@sunbase.org&gt;
This is free software; see the file F<COPYING> for legalese stuff.

=head1 LICENCE

This program is free software; you can redistribute it and/or modify it 
under the terms of the GNU General Public License as published by the 
Free Software Foundation; either version 2 of the License, or (at your 
option) any later version.

This program is distributed in the hope that it will be useful, but 
WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along 
with this program; if not, write to the Free Software Foundation, Inc., 
59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

=head1 SEE ALSO

=cut

# }}}

# vim: set fenc=UTF-8 ft=perl fdm=marker ts=4 sw=4 sts=4 et fo+=w :
# End of file $Id$
